{===========================
{=An include file for the HEIDEN and HEIDENK
{=message files.
{=24/05/94 added G10
{
|M END A|
M00/M02/M30 Program End

M00, M02 and M30 terminate the program.
#M codes#M CODE B
{
|M01 A|
M01 Optional Stop

M01 waits for a key to be pressed.
#M codes#M CODE B
{
|M03 A|
M03 Spindle Forward

M03 starts the spindle rotating in
the forward direction at the
current spindle speed setting.
#M codes#M CODE B
|M04 A|
M04 Spindle Reverse

M04 starts the spindle rotating in
the reverse direction at the
current spindle speed setting.
#M codes#M CODE B
{
|M05 A|
M05 Spindle Stop

M05 stops the spindle rotating, but
does not change the spindle speed
setting.
#M codes#M CODE B
{
|M06 A|
M06 Tool Change
M06 is for a non-Automatic Tool Changer
machine.

M06 performs
   * Spindle Stop
   * Move to tool change Z position.
   * Move to tool change XY position.
#M codes#M CODE B
{
|M08 A|
M08 Coolant On

M08 Turns the coolant on.
#M codes#M CODE B
|M09 A|
M09 Coolant Off

M09 Turns the coolant off.
#M codes#M CODE B
{
|M10/11 A|
M10/11 Work Clamp Open/Close

M10 Opens the work clamp.

M11 Closes the work clamp.
#M codes#M CODE B
{
|M13 A|
M13 Spindle Fwd + Coolant

M13 starts the spindle rotating in
the forward direction at the
current spindle speed setting.

The coolant is also turned on.
#M codes#M CODE B
|M14 A|
M14 Spindle Rev + Coolant

M14 starts the spindle rotating in
the reverse direction at the
current spindle speed setting.

The coolant is also turned on.
#M codes#M CODE B
{
|M19 A|
M19 Orientate Spindle

M19 orientates the spindle.
#M codes#M CODE B
{
|M20/21 A|
M20/21 ATC Arm In/Out

M20 moves the ATC arm in.

M21 moves the ATC arm out
#M codes#M CODE B
{
|M22/23 A|
M22/23 ATC Arm Down/Up

M22 moves the ATC arm down.

M23 moves the ATC arm up.
#M codes#M CODE B
{
|M24/25 A|
M24/25 ATC Arm Clamping

M24 activates the ATC drawbar.

M25 releases the ATC drawbar.
#M codes#M CODE B
{
|M27 A|
M27 Reset Carousel

M27 can only be used in the control panel.

The current carousel position is treated
as position one.
#M codes#M CODE B
{
|M32/33 A|
M32/33 ATC Clw/Cclw

M32 rotates the ATC clockwise.

M33 rotates the ATC counter-clockwise.
#M codes#M CODE B
{
|M38/39 A|
M38/39 Door Open/Close

M38 opens the door.

M39 closes the door.
#M codes#M CODE B
{
|M99 A|
M99 Cycle Call

M99 performs a cycle call.
#M codes#M CODE B
{
{==================
{
{
|CLEAR DIRECTIVE A|
Clear Directive

 This clears the tutorial messages window.

   Example:  [CLEAR
#Other CNC instructions#CNC A
{
{
|SHOW DIRECTIVE A|
Enable Simulation

This directive allows the operations
to be simulated.

Example:  [SHOW
#Other CNC instructions#CNC A
{
{
|NOSHOW DIRECTIVE A|
Disable Simulation

This directive stops the operations
being simulated.

Example:  [NOSHOW
#Other CNC instructions#CNC A
{
{
|STEP DIRECTIVE A|
Enable Single Step

This directive enables single step mode.

Execution will pause after every block
until a key is pressed.

Example:  [STEP
#Other CNC instructions#CNC A
{
|NOSTEP DIRECTIVE A|
Disable Single Step

This directive disables single step mode.

Execution will will be continuous between blocks.

Example:  [NOSTEP
#Other CNC instructions#CNC A
{
{
|TUTOR A|
Tutorial Message

 Tutorial message instructions begin with the "!"
 exclamation mark which is followed by some text.

 When the CNC program is executed your text will
 appear in the "tutorial" window at the bottom
 of the screen.

   Example:  !Using tool 2 ....
#Tutorial pauses#TUTOR PAUSE A
#Other CNC instructions#CNC A
|TUTOR PAUSE A|
Tutorial Pause

 Tutorial pause instructions begin with the "?"
 question mark which is followed by some text.

 When the CNC program is executed your text will
 appear in the "tutorial" window at the bottom
 of the screen.  You will then be prompted to
 press a key to continue.

   Example:  ?Check the position
#Tutorial messages#TUTOR A
#Other CNC instructions#CNC A
{
|DIRECTIVES A|
Directives

 Directives are used in this program to
 control the execution of CNC programs.

 Select one of them
 from the menu for
 more information.
#Clear messages#CLEAR DIRECTIVE A
#Enable Simulation#SHOW DIRECTIVE A
#Disable Simulation#NOSHOW DIRECTIVE A
#Step Directive#STEP DIRECTIVE A
#NoStep Directive#NOSTEP DIRECTIVE A
#Other CNC instructions#CNC A
{
| COMMENTS A |
Comments

 Use the ( as the first character to specify a
 comment.
{
| TUTORIAL A |
Tutorials

 Interactive lessons can be developed through
 the Tutorials facility. Messages and Questions
 can be embedded within the Cnc program.

   !Displays message without stopping.
   ?Displays message but stops for keypress.
#Tutorial messages#TUTOR A
#Tutorial pauses#TUTOR PAUSE A
{
{
{   This is the main menu
{
| MAIN MENU |
Main Menu
Edit only
Edit and Simulate
Simulate only
CNC Files
Print
Remote link
Settings
Utilities
Quit
{
{   This is the cnc files sub-menu
{
| CNC FILES MENU |
CNC Files
Load
New
Save
Save As
Change dir
{
{   This is the print sub-menu
{
| PRINT MENU |
Printing
Line format with errors
Line format no errors
{
{   This is the settings sub-menu
{
| SETTINGS MENU |
Change Settings
Editor
Simulation
Print device
Print page layout
Remote link
Miscellaneous
Load settings
Save settings
{
{   This menu allows changes to editor parameters
{
| EDIT SETTINGS MENU |
Change Editor Settings
Auto error check
Marking mode
Edit only mode
Editor on left
{
{   This is the simulation settings menu
{
| SIMULATION SETTINGS MENU |
Change Simulation Settings
Simulation window
Short cuts
Show 3D
Display fast-traverses
Tool motion
{
{   This is the print device settings menu
{
| PRINT SETTINGS MENU |
Change Print Device
Device: Type
        Name
RS232: Baudrate
       Parity
       Data bits
       Stop bits
       Protocol
{
{   This is the print layout sub-menu
{
| PRINT LAYOUT MENU |
Change Print Page Layout
Page width
Page depth
Left margin
Top margin
Bottom margin
Column width
Carriage return nulls
Line feed nulls
Form feed nulls
Print line feeds
{
{   Menu of settings for machine link
{
| MAC LINK SETTINGS MENU |
Change Machine Link
Device name
Baudrate
Parity
Data bits
Stop bits
{
{   This is the sub-menu used for setting up the computer link
{
| COMPUTER LINK SETTINGS MENU |
Change Remote Link
Device name
Baudrate
Parity
Data bits
Stop bits
Send line-feeds
End-of-file
Send XOFF at % full
{
{   This menu is for setting odds-and-ends
{
| MISC SETTINGS MENU |
Change Misc Settings
Global units
User's name
Screen text size
{
{   The edit & simulate options menu
{
| EDIT SIMULATION MENU |
Simulation
Check syntax
Run program
Dry run
Set datum
Set view
3D view
Postprocess
{
{   The edit only options menu
{
| SIMULATION MENU |
Simulation
Run program
Dry run
Set datum
Set view
3D view
Postprocess
{
{   Computer to computer link menu
{
| COMPUTER LINK MENU |
Remote Device Link
Load from device
Send to device
{
{   These are month names for printing the date
{
| MONTHS |
January
February
March
April
May
June
July
August
September
October
November
December
{
{  ----------------------------------------------------------
{
{          The CNC files menu help page
{
{  ----------------------------------------------------------
{
| CNC FILES MENU A |
CNC Files      1 of 2

 Load:
   Loads CNC programs.

 New:
   Destroys the current program and so allows a
   new one to be keyed in.
{
| CNC FILES MENU B |
CNC Files      2 of 2

 Save:
   Saves the CNC program in the same file that
   it was loaded from.

 Save as:
   Saves the CNC program after prompting you to
   key in a new name for it.

 Change dir:
   Allows you to change to a different default
   directory on disc.
{
{  ----------------------------------------------------------
{
{          The print menu help page
{
{  ----------------------------------------------------------
{
| PRINT MENU A |
Printing

 Expanded format:
   Prints the program with prefix labelling and
   G/M code descriptions.

 Line format with errors:
   Prints the program as seen in the editor.
   Error messages will also be printed.

 Line format no errors:
   Prints the program as seen in the editor.
   Error messages will not be printed.
{
{   Main screenfull of info on the control panel
{
{          Information window help
|INFO A|
The Information Box

 You now have on screen various items of
 information about your CNC program.

 Use the arrow keys to scroll through the
 various blocks of information available.
{
{          CNC execute help
|EDIT SIMULATION MENU A|
Simulation      1 of 3

 Check syntax:
   Checks through the whole program for errors
   in the way it is written.

 Run program:
   Starts on-screen simulation.

|EDIT SIMULATION MENU B|
Simulation      2 of 3

 Dry run:
   Runs the program without an on-screen
   display. This provides fast overtravel
   checking.

 Set datum:
   Allows a zero point to be set before
   on-screen simulation.
|EDIT SIMULATION MENU C|
Simulation      3 of 3

 Set view:
   Use this facility to indicate the view you
   require for the on-screen simulation.

 3D view:
   Produce a 3D view of the billet.

 Post Process:
   Produces a program for a different machine.
{
|SIMULATION MENU A|
Simulation     1 of 2

 Run program:
   Starts on-screen simulation.

 Dry run:
   Runs the program without an on-screen
   display. This provides fast overtravel
   checking.

 Set datum:
   Allows a zero point to be set before
   on-screen simulation.
|SIMULATION MENU B|
Simulation     2 of 2

 Set view:
   Use this facility to indicate the view you
   require for the on-screen simulation.

 3D view:
   Produce a 3D view of the billet.

 Post Process:
   Produces a program for a different machine.
{
{   RS232 indicators
{
| RS232 |
None
Odd
Even
{
{   Indicators for print/plot setup
{
| PRINT CONFIG |
File
Dos device
Serial
None
cts/rts
xon/xoff
{
{   A few standard messages
{
| MISC STD MESSAGES |
Yes
No
{
{   Security key check messages
{
| SK |
Key
Security key is not connected
Rechecking - Press ~RESET~ to abort
Checking security key ....
{
|G00 A|
G00 Fast Traverse

  Linear interpolated move at
  maximum feed rate.

  Example:  G00 X20,1 Y12 Z3
#G codes#G CODE B
{
|G01 A|
G01 Linear

  Linear interpolated move.

  Example:  G01 X20,1 Y12 Z3 F300
#G codes#G CODE B
{
|G ARC A|
G02/G03/G05 Circular Interpolation 1/2

  G02 moves clockwise.
  G03 moves counterclockwise.
  G05 moves in the same direction as the
      last arc to be performed.

  Arcs can be specified with:
  a) A centre point and an end point
  b) A radius and an end point
#G codes#G CODE B
|G ARC B|
G02/G03/G05 Circular Interpolation 2/2


  "R" specifies the arc radius
  "I" and "J" specify the centre of the arc.
  "X" and "Y" specify the end point of the arc.


Example:  G02 G90 I+5,0 J+25,0 X+10,0 Y+30,0
          G02 G90 R+5 X+10,0 Y+30,0
#G codes#G CODE B
|G04 A|
G04 Dwell

  Delays the specified number of seconds.

  Example:  G04 F3,5
  Dwell is performed for 3.5 seconds.
#G codes#G CODE B
|G06 A|
G06 Tangential Arc

  Performs an arc to the specified
  coordinates.  The start of the arc
  is tangential to the end of the
  last move.

  Example:  G06 G90 X15,0 Y20,0
#G codes#G CODE B
|G07 A|
G07 Single Axis

Performs single axis positioning.

If G43 or G44 are active then the movement
is increased or decreased by the tool
radius.

  Example:  G07 G90 X+12
#G codes#G CODE B
|G10 A|
G10 Rapid Polar 1/2

Performs a rapid traverse, with the end
point specified as an angle and radius
from a polar point.

  I  X coordinate of pole
  J  Y coordinate of pole
  R  Polar coordinate radius to end point
  H  Polar coordinate angle to end point
#G codes#G CODE B
|G10 B|
G10 Rapid Polar 2/2

  Example:  G10 G91 I+15 J-30 R20,0
            H45,0 F120

#G codes#G CODE B
|G11 A|
G11 Linear Polar 1/2

Performs a linear move, with the end point
specified as an angle and radius from
a polar point.

  I  X coordinate of pole
  J  Y coordinate of pole
  R  Polar coordinate radius to end point
  H  Polar coordinate angle to end point
#G codes#G CODE B
|G11 B|
G11 Linear Polar 2/2

  Example:  G11 G91 I+15 J-30 R20,0
            H45,0 F120

#G codes#G CODE B
|G ARCP A|
G12/G13/G15 Circular Polar 1/2

  G12 moves clockwise.
  G13 moves counterclockwise.
  G15 moves in the same direction as
      the last arc to be performed.

  The end point is specified as an
  angle from the polar point.

  "I" and "J" specify the pole centre
  "H" specifies the arc angle
#G codes#G CODE B
|G ARCP B|
G12/G13/G15 Circular Polar 2/2

  Example:  G13 G90 I+30 J+25 H-180,0

  Moves in an anti-clockwise arc from
  the current position, to an end point
  specified as an angle of -180 degrees, 
  around the pole point I+30, J+25

#G codes#G CODE B
|G16 A|
G16 Tangential Arc Polar 1/2

  Performs an arc to the specified
  coordinates.  The start of the arc
  is tangential to the end of the
  last move.

  "I" and "J" specify the pole centre
  "H" specifies the arc angle
  "R" specifies the arc radius
#G codes#G CODE B
|G16 B|
G16 Tangential Arc Polar 2/2

Example:  G16 H+45,0 R+12,0 I+30 J+25

  Moves in an arc from the current 
  position, to an end point specified 
  as an angle of +45 degrees and
  radius of 12 units around the
  pole point I+30, J+25

  The direction of the arc is
  determined by the direction 
  of the previous move.
#G codes#G CODE B
|G28 A|
G28 Mirror Image

G28 causes mirror imaging to be performed
about the datum for the axes specified.

If an axis is not specified then mirror
imaging is disabled for that axis.

  Example:  G28 X Y
#G codes#G CODE B
|G30/1 A|
G30/G31 Blank Form

G30 defines the position of the bottom corner
of the billet.

G31 defines the position of the top corner of
the billet.

The positions are relative to the datum.

  Example:  G30 X+0,0 Y+0,0 Z-10,0
            G31 G91 X+80,0 Y+80,0 Z+0,0
#G codes#G CODE B
|G38 A|
G38 Stop

G38 causes the program to pause until
    a key is pressed.
#G codes#G CODE B
|G40 A|
G40 No tool Compensation

G40 cancels tool compensation.

G40 cancels the single axis move tool
    radius offset.
#G codes#G CODE B
|G41/2 A|
G41/G42 Tool Compensation

G41 causes tool compensation to be
    performed to the left.

G42 causes tool compensation to be
    performed to the right.

G40 cancels tool compensation.
#G codes#G CODE B
|G43/4 A|
G43/G44 Axis Compensation

G43 causes a single axis movement to be
    increased by the tool radius.

G44 causes a single axis movement to be
    decreased by the tool radius.

G40 cancels axis compensation.
#G codes#G CODE B
|G54 A|
G54 Datum Shift

G54 moves the datum.

An absolute position is relative to the
original datum.

An incremental position is relative to
the last datum.

  Example:  G54 G91 X+20 Y20 G90 Z3
#G codes#G CODE B
|G72 A|
G72 Scaling

This causes all subsequent distances on
the X and Y axes to be multiplied by the
scale factor.

  Example:  G72 F1 G90 G1 X15
  and       G72 F1.5 G90 G10
  are equivalent.
#G codes#G CODE B
|G74 A|
G74 Slot Milling 1/2

This specifies all the parameters required by
the slot milling cycle.

  P01  Set-up clearance
  P02  Milling depth
  P03  Pecking depth
  P04  Vertical feedrate
  P05  1st side length
  P06  2nd side length
  P07  Cutting feedrate
#G codes#G CODE B
|G74 B|
G74 Slot Milling 2/2

Example:  G74 P01 -1 P02 -8 P03 -1,5 P04 90
              P05 X+10 P06 Y+14 P07 300

This will mill a slot X 10 by Y 14, to a depth
of Z-8, in pecks of 1.5 units.

Note: Parameters P01/P02/P03 must
      All have the same sign.

#G codes#G CODE B
|G75/6 A|
G75/G76 Rectangular Pocket 1/2

This specifies all the parameters required by
the rectangular pocket milling cycle.

G75 mills clockwise, G76 mills anti-clockwise.

  P01  Set-up clearance
  P02  Milling depth
  P03  Pecking depth
  P04  Vertical feedrate
  P05  1st side length
  P06  2nd side length
  P07  Cutting feedrate
#G codes#G CODE B
|G75/6 B|
G75/G76 Rectangular Pocket 2/2

Example:  G74 P01 -1 P02 -8 P03 -1,5 P04 90
              P05 X+15 P06 Y+25 P07 300

This will mill a rectangular pocket X 15 by Y 25,
to a depth of Z -8, in pecks of 1.5 units.

Note: Parameters P01/P02/P03 must
      all have the same sign.
      Parameters P05 and P06 must
      have a positive sign.
#G codes#G CODE B
|G77/8 A|
G77/G78 Circular Pocket 1/2

This specifies all the parameters required by
the circular pocket milling cycle.

G77 mills clockwise, G78 mills anti-clockwise.

  P01  Set-up clearance
  P02  Milling depth
  P03  Pecking depth
  P04  Vertical feedrate
  P05  Circle Radius
  P06  Cutting feedrate
#G codes#G CODE B
|G77/8 B|
G77/G78 Circular Pocket 2/2

Example:  G77 P01 -1 P02 -5 P03 -1,5 P04 90
              P05 25 P06 300

This will mill a circular pocket with a 
radius of 25, to a depth of Z -5,
in pecks of 1.5units.

Note: Parameters P01/P02/P03 must
      all have the same sign.
#G codes#G CODE B
|G79 A|
G79 Cycle Call

This causes the last defined cycle to be
performed.

  Example:  G79
#G codes#G CODE B
|G83 A|
G83 Pecking 1/2

This specifies all the parameters required by
the pecking cycle.

  P01  Set-up clearance
  P02  Total hole depth
  P03  Pecking depth
  P04  Dwell
  P05  Feedrate
#G codes#G CODE B
|G83 B|
G83 Pecking 2/2

Example:  G83 P01 -1 P02 -20 P03 -5 P04 0
              P05 50

This will peck drill a hole to a depth 
of Z-20 in pecks of 5 units.

Note: Parameters P01/P02/P03 must
      all have the same sign.
#G codes#G CODE B
|G90/1 A|
G90/G91 Absolute/Incremental

These G codes change the way succeeding
positions and angles are interpreted.

G90 means the parameters are absolute values.

G91 means the parameters are relative to their
    previous value.

   Example: G01 G90 X+80,0 G91 Y+10,0
#G codes#G CODE B
|G98 A|
G98 Label

This assigns a label to the current line.
That line can then be referred to by its
label.

   Example:  G98 L3

Label 0 defines the end of a subprogram.
#G codes#G CODE B
|G99 A|
G99 Tooldef

This allows a tool to be given a length
and radius.

  Example: G99 T1 L+4 R+3
  Tool 1 is specified as being 4 units longer
  than the reference tool with a radius of 3.
#G codes#G CODE B
